<?php
/*
**************************************************************************
*  File: VBULLETIN/ext_vbulletin.php
*  (c) Extreme Portal vBulletin Version 2012-2014
*  By elwizard. All rights reserved.
*  http://www.mgsteam.es
*
*  This program is free software under MGS License Agreement. 
*  You cannot distribute in any way. For modifications, please read 
*  MGS License Agreement for more information.
*
**************************************************************************
*/

if (!defined("IN_EXT")) {
    die ("Sorry !! You cannot access this file directly.");
}


class ext_vbulletin {

	function ext_vbulletin() {
		global $vbulletin, $bootstrap;
    
		require_once('includes/config.php');


    // PATH CORRECTION (if needed). Do not edit.
    if (defined('VB_RELATIVE_PATH')){ chdir('./' . VB_RELATIVE_PATH); }


    // ERRORS ON
    error_reporting(E_ALL & ~E_NOTICE);

    // DEFINE IMPORTANT CONSTANTS
    define('THIS_SCRIPT', 'index');
    define('CSRF_PROTECTION', true);
    define('CSRF_SKIP_LIST', '');
    define('VB_ENTRY', 'forum.php');

    // get special phrase groups
    $phrasegroups = array('holiday');

    // get special data templates from the datastore
    $specialtemplates = array('userstats', 'birthdaycache', 'maxloggedin', 'iconcache', 'eventcache', 'mailqueue', 'activeblocks');

    // pre-cache templates used by all actions
    $globaltemplates = array('ad_board_after_forums', 'ad_board_below_whats_going_on', 'block_blogentries', 'block_cmsarticles', 'block_newposts',
	                           'block_sgdiscussions', 'block_tagcloud',	'block_threads', 'block_html', 'FORUMHOME', 'forumhome_event', 'forumhome_subforums',
	                           'forumhome_forumbit_level1_nopost', 'forumhome_forumbit_level1_post', 'forumhome_forumbit_level2_nopost', 'forumhome_forumbit_level2_post',
	                           'forumhome_lastpostby', 'tag_cloud_link');

    // pre-cache templates used by specific actions
    $actiontemplates = array();

    require_once('includes/class_bootstrap.php');

    define('VB_AREA', 'Forum');

    $bootstrap = new vB_Bootstrap_Forum();
    $bootstrap->datastore_entries = $specialtemplates;
    $bootstrap->cache_templates = vB_Bootstrap::fetch_required_template_list(
	    empty($_REQUEST['do']) ? '' : $_REQUEST['do'],
	    $actiontemplates, $globaltemplates
    );

    $bootstrap->bootstrap();

	}
	
	
} // end class

$ext_vb = new ext_vbulletin;


?>